package day12;

import java.io.IOException;
import java.text.ParseException;
import java.text.SimpleDateFormat;

//抛出异常
public class demo4 {
    public static void main(String[] args) throws ParseException {
        new demo4().test();
    }
    public void test() throws ParseException{ //上一级
        play();
    }
    public void play()throws ParseException {
        System.out.println("执行娱乐方法!");
        SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
        sdf.parse("2024-10-20");
    }
}
